<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AWTK-JAVA: awtk.ImageBase类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AWTK-JAVA
   </div>
   <div id="projectbrief">AWTK JAVA API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>awtk</b></li><li class="navelem"><a class="el" href="classawtk_1_1_image_base.html">ImageBase</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="classawtk_1_1_image_base-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">awtk.ImageBase类 参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
类 awtk.ImageBase 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classawtk_1_1_image_base.png" usemap="#awtk.ImageBase_map" alt=""/>
  <map id="awtk.ImageBase_map" name="awtk.ImageBase_map">
<area href="classawtk_1_1_gif_image.html" alt="awtk.GifImage" shape="rect" coords="0,112,119,136"/>
<area href="classawtk_1_1_image.html" alt="awtk.Image" shape="rect" coords="129,112,248,136"/>
<area href="classawtk_1_1_mutable_image.html" alt="awtk.MutableImage" shape="rect" coords="258,112,377,136"/>
<area href="classawtk_1_1_svg_image.html" alt="awtk.SvgImage" shape="rect" coords="387,112,506,136"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a2bc2ed96c5dc9501bfdf0a79a409839d"><td class="memItemLeft" align="right" valign="top"><a id="a2bc2ed96c5dc9501bfdf0a79a409839d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>ImageBase</b> (long nativeObj)</td></tr>
<tr class="separator:a2bc2ed96c5dc9501bfdf0a79a409839d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe3237e68270a74c238840abc559a483"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#abe3237e68270a74c238840abc559a483">setImage</a> (String name)</td></tr>
<tr class="separator:abe3237e68270a74c238840abc559a483"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c9c088486f3a96bec627192179d43dc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a9c9c088486f3a96bec627192179d43dc">setRotation</a> (double rotation)</td></tr>
<tr class="separator:a9c9c088486f3a96bec627192179d43dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0ee43967050216adad167235a7848a3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#ad0ee43967050216adad167235a7848a3">setScale</a> (double scale_x, double scale_y)</td></tr>
<tr class="separator:ad0ee43967050216adad167235a7848a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a651b84b0abc63a7e8bcd88e8916960de"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a651b84b0abc63a7e8bcd88e8916960de">setAnchor</a> (double anchor_x, double anchor_y)</td></tr>
<tr class="separator:a651b84b0abc63a7e8bcd88e8916960de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16469d2873d45852603596f9395660f7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a16469d2873d45852603596f9395660f7">setSelected</a> (boolean selected)</td></tr>
<tr class="separator:a16469d2873d45852603596f9395660f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b201f564a63aea4488f7c6090f81181"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a6b201f564a63aea4488f7c6090f81181">setSelectable</a> (boolean selectable)</td></tr>
<tr class="separator:a6b201f564a63aea4488f7c6090f81181"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a54077cd841d920f54f5c33c84cf9c9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="enumawtk_1_1_ret.html">Ret</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a7a54077cd841d920f54f5c33c84cf9c9">setClickable</a> (boolean clickable)</td></tr>
<tr class="separator:a7a54077cd841d920f54f5c33c84cf9c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17aa095933a2767502d48fcdc1701b30"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a17aa095933a2767502d48fcdc1701b30">getImage</a> ()</td></tr>
<tr class="separator:a17aa095933a2767502d48fcdc1701b30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32cb2a987fc896328c15f90db069fe37"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a32cb2a987fc896328c15f90db069fe37">getAnchorX</a> ()</td></tr>
<tr class="separator:a32cb2a987fc896328c15f90db069fe37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f07a92c5ee39bede5a4dc7185d06846"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a4f07a92c5ee39bede5a4dc7185d06846">getAnchorY</a> ()</td></tr>
<tr class="separator:a4f07a92c5ee39bede5a4dc7185d06846"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad03bf2dc911393faafa26f566e180812"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#ad03bf2dc911393faafa26f566e180812">getScaleX</a> ()</td></tr>
<tr class="separator:ad03bf2dc911393faafa26f566e180812"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d0ac46dc50c8f9702df123328ae8d64"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a7d0ac46dc50c8f9702df123328ae8d64">getScaleY</a> ()</td></tr>
<tr class="separator:a7d0ac46dc50c8f9702df123328ae8d64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac456be20e29c6b7d7570ef28e5f696cc"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#ac456be20e29c6b7d7570ef28e5f696cc">getRotation</a> ()</td></tr>
<tr class="separator:ac456be20e29c6b7d7570ef28e5f696cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa6281abe1eb0c47ccb3605bf49ce7cc2"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#aa6281abe1eb0c47ccb3605bf49ce7cc2">getClickable</a> ()</td></tr>
<tr class="separator:aa6281abe1eb0c47ccb3605bf49ce7cc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a692819204ca7601b6ee5e95bb831cf3c"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a692819204ca7601b6ee5e95bb831cf3c">getSelectable</a> ()</td></tr>
<tr class="separator:a692819204ca7601b6ee5e95bb831cf3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd78f0ba96dc8f8d5f6fc61186604a04"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#abd78f0ba96dc8f8d5f6fc61186604a04">getSelected</a> ()</td></tr>
<tr class="separator:abd78f0ba96dc8f8d5f6fc61186604a04"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a60e5286e5d477f7f274f0edaea089a7c"><td class="memItemLeft" align="right" valign="top"><a id="a60e5286e5d477f7f274f0edaea089a7c"></a>
static <a class="el" href="classawtk_1_1_image_base.html">ImageBase</a>&#160;</td><td class="memItemRight" valign="bottom"><b>cast</b> (long nativeObj)</td></tr>
<tr class="separator:a60e5286e5d477f7f274f0edaea089a7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0677c028ec88d0d23ff57ad0ed2ec358"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classawtk_1_1_image_base.html">ImageBase</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classawtk_1_1_image_base.html#a0677c028ec88d0d23ff57ad0ed2ec358">cast</a> (Widget widget)</td></tr>
<tr class="separator:a0677c028ec88d0d23ff57ad0ed2ec358"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:ad9fb294c0c5f541ad5961ab979e05fdc"><td class="memItemLeft" align="right" valign="top"><a id="ad9fb294c0c5f541ad5961ab979e05fdc"></a>
long&#160;</td><td class="memItemRight" valign="bottom"><b>nativeObj</b></td></tr>
<tr class="separator:ad9fb294c0c5f541ad5961ab979e05fdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>图片控件基类。</p>
<p>本类把图片相关控件的公共行为进行抽象，放到一起方便重用。目前已知的具体实现如下图：</p>
<p>本类是一个抽象类，不能进行实例化。请在应用程序中使用具体的类，如image_t。</p>
<p>如果需要显示文件系统中的图片，只需将图片名称换成实际的文件名，并加上"file://"前缀即可。如：</p>
<div class="fragment"><div class="line">&lt;image draw_type=<span class="stringliteral">&quot;center&quot;</span> image=<span class="stringliteral">&quot;file://./demos/assets/default/raw/images/xx/flag_CN.png&quot;</span> /&gt;</div><div class="line">&lt;gif image=<span class="stringliteral">&quot;file://./demos/assets/default/raw/images/x2/bee.gif&quot;</span> /&gt;</div><div class="line">&lt;svg image=<span class="stringliteral">&quot;file://./demos/assets/default/raw/images/svg/china.bsvg&quot;</span> /&gt;</div></div><!-- fragment --> </div><h2 class="groupheader">成员函数说明</h2>
<a id="a0677c028ec88d0d23ff57ad0ed2ec358"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0677c028ec88d0d23ff57ad0ed2ec358">&#9670;&nbsp;</a></span>cast()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classawtk_1_1_image_base.html">ImageBase</a> awtk.ImageBase.cast </td>
          <td>(</td>
          <td class="paramtype">Widget&#160;</td>
          <td class="paramname"><em>widget</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>转换为image_base对象(供脚本语言使用)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">widget</td><td>image_base对象。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>image_base对象。 </dd></dl>

</div>
</div>
<a id="a32cb2a987fc896328c15f90db069fe37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32cb2a987fc896328c15f90db069fe37">&#9670;&nbsp;</a></span>getAnchorX()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double awtk.ImageBase.getAnchorX </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>锚点X(0-1)。0在控件左边，0.5在控件中间，1在控件右边。 </p>

</div>
</div>
<a id="a4f07a92c5ee39bede5a4dc7185d06846"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f07a92c5ee39bede5a4dc7185d06846">&#9670;&nbsp;</a></span>getAnchorY()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double awtk.ImageBase.getAnchorY </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>锚点Y(0-1)。0在控件顶部，0.5在控件中间，1在控件底部。 </p>

</div>
</div>
<a id="aa6281abe1eb0c47ccb3605bf49ce7cc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa6281abe1eb0c47ccb3605bf49ce7cc2">&#9670;&nbsp;</a></span>getClickable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.ImageBase.getClickable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>点击时，是否触发EVT_CLICK事件。 </p>

</div>
</div>
<a id="a17aa095933a2767502d48fcdc1701b30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17aa095933a2767502d48fcdc1701b30">&#9670;&nbsp;</a></span>getImage()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">String awtk.ImageBase.getImage </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>图片的名称。 </p>

</div>
</div>
<a id="ac456be20e29c6b7d7570ef28e5f696cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac456be20e29c6b7d7570ef28e5f696cc">&#9670;&nbsp;</a></span>getRotation()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double awtk.ImageBase.getRotation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>控件的旋转角度(幅度)。 </p>

</div>
</div>
<a id="ad03bf2dc911393faafa26f566e180812"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad03bf2dc911393faafa26f566e180812">&#9670;&nbsp;</a></span>getScaleX()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double awtk.ImageBase.getScaleX </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>控件在X方向上的缩放比例。 </p>

</div>
</div>
<a id="a7d0ac46dc50c8f9702df123328ae8d64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d0ac46dc50c8f9702df123328ae8d64">&#9670;&nbsp;</a></span>getScaleY()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double awtk.ImageBase.getScaleY </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>控件在Y方向上的缩放比例。 </p>

</div>
</div>
<a id="a692819204ca7601b6ee5e95bb831cf3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a692819204ca7601b6ee5e95bb831cf3c">&#9670;&nbsp;</a></span>getSelectable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.ImageBase.getSelectable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>是否设置选中状态。 </p>

</div>
</div>
<a id="abd78f0ba96dc8f8d5f6fc61186604a04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd78f0ba96dc8f8d5f6fc61186604a04">&#9670;&nbsp;</a></span>getSelected()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">boolean awtk.ImageBase.getSelected </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>当前是否被选中。 </p>

</div>
</div>
<a id="a651b84b0abc63a7e8bcd88e8916960de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a651b84b0abc63a7e8bcd88e8916960de">&#9670;&nbsp;</a></span>setAnchor()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageBase.setAnchor </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>anchor_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>anchor_y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置控件的锚点(仅在WITH_VGCANVAS定义时生效)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">anchor_x</td><td>锚点X(0-1)。0在控件左边，0.5在控件中间，1在控件右边。 </td></tr>
    <tr><td class="paramname">anchor_y</td><td>锚点Y(0-1)。0在控件顶部，0.5在控件中间，1在控件底部。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a7a54077cd841d920f54f5c33c84cf9c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a54077cd841d920f54f5c33c84cf9c9">&#9670;&nbsp;</a></span>setClickable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageBase.setClickable </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>clickable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置控件是否可以被点击。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">clickable</td><td>是否可以被点击。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="abe3237e68270a74c238840abc559a483"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe3237e68270a74c238840abc559a483">&#9670;&nbsp;</a></span>setImage()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageBase.setImage </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置控件的图片名称。</p>
<p>如果需要显示文件系统中的图片，只需将图片名称换成实际的文件名，并加上"file://"前缀即可。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>图片名称，该图片必须存在于资源管理器。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a9c9c088486f3a96bec627192179d43dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c9c088486f3a96bec627192179d43dc">&#9670;&nbsp;</a></span>setRotation()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageBase.setRotation </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>rotation</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置控件的旋转角度(仅在WITH_VGCANVAS定义时生效)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">rotation</td><td>旋转角度(幅度)。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="ad0ee43967050216adad167235a7848a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0ee43967050216adad167235a7848a3">&#9670;&nbsp;</a></span>setScale()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageBase.setScale </td>
          <td>(</td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>scale_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>scale_y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置控件的缩放比例(仅在WITH_VGCANVAS定义时生效)。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">scale_x</td><td>X方向缩放比例。 </td></tr>
    <tr><td class="paramname">scale_y</td><td>Y方向缩放比例。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a6b201f564a63aea4488f7c6090f81181"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b201f564a63aea4488f7c6090f81181">&#9670;&nbsp;</a></span>setSelectable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageBase.setSelectable </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>selectable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置控件是否可以被选中。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">selectable</td><td>是否可以被选中。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a id="a16469d2873d45852603596f9395660f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16469d2873d45852603596f9395660f7">&#9670;&nbsp;</a></span>setSelected()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="enumawtk_1_1_ret.html">Ret</a> awtk.ImageBase.setSelected </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>selected</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>设置控件的选中状态。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">selected</td><td>是否被选中。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>返回RET_OK表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>output/ImageBase.java</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
